Skip to content

Lab03#3

Open
ellilin wants to merge 13 commits intomasterfrom
lab03
Open

Lab03#3
ellilin wants to merge 13 commits intomasterfrom
lab03

Conversation

@ellilin
Copy link
Owner

@ellilin ellilin commented Feb 8, 2026

No description provided.

Main Tasks (Python app):
- Add production-ready Dockerfile with best practices
  - Non-root user (appuser)
  - Specific base image version (python:3.13-slim)
  - Proper layer ordering for caching
  - Health check implementation
- Create .dockerignore for optimized build context
- Add Docker section to README.md with usage examples
- Create comprehensive LAB02.md documentation
- Push image to Docker Hub (ellilin/devops-info-service:v1.0.0)
- Final image size: 208MB

Bonus Task (Go app - Multi-stage build):
- Implement multi-stage Dockerfile for Go application
  - Stage 1: Builder (golang:1.21-alpine) for compilation
  - Stage 2: Runtime (alpine:3.19) for minimal footprint
  - Static binary with stripped symbols (-ldflags='-s -w')
- Create .dockerignore for Go
- Build 31.6MB final image (91% smaller than single-stage)
- Push to Docker Hub (ellilin/devops-info-service-go:v1.0.0)
- Create detailed LAB02.md documentation explaining:
  - Multi-stage strategy and benefits
  - Size comparison analysis
  - Security implications
  - Technical explanation of each stage

Security:
- Both apps run as non-root user
- Minimal base images for reduced attack surface
- No build tools in production images
- Proper health checks implemented
@codecov-commenter
Copy link

Welcome to Codecov 🎉

Once you merge this PR into your default branch, you're all set! Codecov will compare coverage reports and display results in all future pull requests.

ℹ️ You can also turn on project coverage checks and project coverage reporting on Pull Request comment

Thanks for integrating Codecov - We've got you covered ☂️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants